<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        /* .left {
            float: left;
            width: 33%;
            height: 100px;
            background: #631D9F;
        }

        .center {
            margin-left: 33%;
            margin-right: 33%;
            height: 400px;
            background-color: #4990E2;
        }

        .right {
            float: right;
            width: 33%;
            height: 100px;
            background: red;
        }

        .main::after {
            content: '';
            display: block;
            clear: both;
        } */

        /* .main{
            position: relative;
            width: 100%;
            height: 100px;
        }
        .left{
            position: absolute;
            width: 100px;
            left: 0;
            height: 100px;
            background-color: red;
        }
        .center{
            position: absolute;
            left: 100px;
            right: 100px;
            width: auto;
            height: 100px;
            background-color: blue;
        }
        .right{
            position: absolute;
            width: 100px;
            right: 0;
            height: 100px;
            background-color: rosybrown;
        } */

        /* .main{
            width: 100%;
            display: table;
        }
        .left,.center,.right{
            display: table-cell;
            height: 30px;
        }
        .left{
            width: 100px;
            background-color: red;
        }
        .center{
            background-color: blue;
        }
        .right{
            width: 100px;
            background-color: red;
        } */


        /* .main{
            display: flex;
            height: 100px;
        }
        .left{
            width: 33.3%;
            background-color: red;
        }
        .center{
            width: 33.3%;
            background-color: blue;
        }
        .right{
            width: 33.3%;
            background-color: red;
        } */

        /* .main {
            width: 100%;
            display: grid;
            grid-template-rows: 100px;
            grid-template-columns: 300px auto 300px;
        } */
    </style>
</head>

<body>

    <!-- 1.float布局 -->
    <!-- <div class="main">
        <div class="left"></div>
        
        <div class="right"></div>
        <div class="center"></div>
    </div> -->

    <!-- 2.position布局 -->
    <!-- <div class="main">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div> -->

    <!-- 3. table布局 -->
    <!-- <div class="main">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div> -->

    <!-- 4. flex布局 -->
    <!-- <div class="main">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div> -->

    <!-- 5. grid布局 -->
    <div class="main">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div>
</body>

</html>